//
//  AboutUsTableViewCell.m
//  Cup
//
//  Created by dllo on 15/5/2.
//  Copyright (c) 2015年 doll. All rights reserved.
//

#import "AboutUsTableViewCell.h"
#define WIDTH self.contentView.frame.size.width
@implementation AboutUsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.label = [[UILabel alloc] init];
        self.label.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];
        self.label.numberOfLines = 0;
        [self.label sizeToFit];
        [self.contentView addSubview:self.label];
        [self.label release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    NSDictionary *dic= [NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"Helvetica-Bold" size:18],NSFontAttributeName, nil];
    CGRect rect = [self.label.text boundingRectWithSize:CGSizeMake(WIDTH - 50, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    self.label.frame = CGRectMake(25, 30, WIDTH - 50, rect.size.height);
}

- (void)dealloc
{
    [_label release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
